package com.bl.bean.network;

import java.io.BufferedInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;

import com.bl.bean.network.byt.aaa;
import com.bl.bean.network.byt.bbb;
import com.bl.bean.network.byt.ccc;

public class aaaa
{
	private static void ax(aaa parama, InputStream paramInputStream)
		    throws IOException
		  {
			bbb bbyt = new bbb();
		    paramInputStream.read(bbyt.dT(), 0, bbyt.dT().length);
		    paramInputStream.read(bbyt.dU(), 0, bbyt.dU().length);
		    paramInputStream.read(bbyt.dV(), 0, bbyt.dV().length);
		    paramInputStream.read(bbyt.dW(), 0, bbyt.dW().length);
		    paramInputStream.read(bbyt.dX(), 0, bbyt.dX().length);
		    parama.a(bbyt);
		    ccc ccyt = new ccc();
		    paramInputStream.read(ccyt.dY(), 0, ccyt.dY().length);
		    paramInputStream.read(ccyt.dZ(), 0, ccyt.dZ().length);
		    paramInputStream.read(ccyt.ea(), 0, ccyt.ea().length);
		    paramInputStream.read(ccyt.eb(), 0, ccyt.eb().length);
		    paramInputStream.read(ccyt.ec(), 0, ccyt.ec().length);
		    paramInputStream.read(ccyt.ed(), 0, ccyt.ed().length);
		    paramInputStream.read(ccyt.ee(), 0, ccyt.ee().length);
		    paramInputStream.read(ccyt.ef(), 0, ccyt.ef().length);
		    paramInputStream.read(ccyt.eg(), 0, ccyt.eg().length);
		    paramInputStream.read(ccyt.eh(), 0, ccyt.eh().length);
		    paramInputStream.read(ccyt.ei(), 0, ccyt.ei().length);
		    parama.a(ccyt);
		  }
	public static long e(int paramInt1, int paramInt2)
	  {
	    long l = 1L;
	    for (int i = 0; i < paramInt2; i++) {
	      l *= paramInt1;
	    }
	    return l;
	  }
	public static long i(byte[] paramArrayOfByte)
	  {
	    long l = 0L;
	    for (int i = 0; i < paramArrayOfByte.length; i++) {
	      l += ((paramArrayOfByte[i] & 0xFF) << i * 8);
	    }
	    return l;
	  }		  
	public static String c(InputStream arg18) throws IOException {
        int v6_1;
        int v0_2;
        long v16;
        long v14;
        long v10;
        long v8;
        long v6;
        long v4;
        BufferedInputStream v3  = new BufferedInputStream(arg18);;
        aaa v0 = new aaa();
        ByteArrayOutputStream v1 = new ByteArrayOutputStream();

        try {
            ((InputStream)v3).mark(1);
            ax(v0, ((InputStream)v3));
            v4 = i(v0.dR().dX());
            v6 = i(v0.dS().eh());
            v8 = i(v0.dS().dY());
            v10 = i(v0.dS().ec());
            ((InputStream)v3).reset();
            v14 = 14;
            if(v10 < 24) {
                v16 = 4;
                if(v6 == 0) {
                    v8 += v14;
                    v0_2 = ((int)v10);
                    v6_1 = 2;
                    v10 = e(v6_1, v0_2);
                    Long.signum(v10);
                    v10 = v10 * v16 + v8;
                    try {
                        ((InputStream)v3).skip(v10);
                        v8 += e(v6_1, v0_2) * v16;
                        byte[] v0_3 = new byte[0x400];
                        while(true) {
                            v6_1 = ((InputStream)v3).read(v0_3);
                            if(v6_1 > 0) {
                                v10 = (((long)v6_1)) + v8;
                                if(v10 > v4) {
                                    v1.write(v0_3, 0, ((int)(v4 - v8)));
                                }
                                else {
                                    v1.write(v0_3, 0, v6_1);
                                    v8 = v10;
                                    continue;
                                }
                            }

                            break;
                        };
                    }catch(Exception v0_1) {
                    	v0_1.printStackTrace();
                    }
                }
                else {
                	 v8 = v8 + v14 + v6 * v16;
                     ((InputStream)v3).skip(v8);
                     byte[] v0_3 = new byte[0x400];
                     while(true) {
                         v6_1 = ((InputStream)v3).read(v0_3);
                         if(v6_1 > 0) {
                             v10 = (((long)v6_1)) + v8;
                             if(v10 > v4) {
                                 v1.write(v0_3, 0, ((int)(v4 - v8)));
                             }
                             else {
                                 v1.write(v0_3, 0, v6_1);
                                 v8 = v10;
                                 continue;
                             }
                         }

                         break;
                     }
                }
            }
            else {
            	 v8 += v14;
                 ((InputStream)v3).skip(v8);
            }

        }
        catch(Exception v0_1) {
        	v0_1.printStackTrace();
        }
        return v1.toString();
	}
}
